/*
 * Discquote.h
 *
 *  Created on: 2020年12月10日
 *      Author: san
 */

#ifndef DISCQUOTE_H_
#define DISCQUOTE_H_

#include <iostream>
#include <string>

#include "Quote.h"

class Disc_quote: public Quote{
public:
	Disc_quote() { std::cout << "Disc_quote()" << std::endl;};
	Disc_quote(const std::string &book, double price, std::size_t qty, double disc):
		Quote(book, price), quantity(qty), discount(disc) { }
	Disc_quote(const Disc_quote &d): Quote(d), quantity(d.quantity), discount(d.discount) { std::cout << "Disc_quote(const Disc_quote &d)" << std::endl;}

	double net_price(std::size_t n) const override = 0;
	void debug() const override {
		std::cout << "bookNo" << "," << "price" << "," << "quantity" << "," << "discount" << std::endl; }
	virtual ~Disc_quote();

protected:
	std::size_t quantity = 0;  // 折扣适用的购买量
	double discount;

protected:
	std::string test = "test";
};

#endif /* DISCQUOTE_H_ */
